package eteam.aps.controller;

import eteam.aps.common.R;
import eteam.aps.common.exceptions.AuthException;
import eteam.aps.common.helper.JsonPage;
import eteam.aps.model.vo.OnlyProductVo;
import eteam.aps.model.vo.ProductInfoVo;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 唯一产品控制器
 *
 * @author WMT
 * @Date 2023/2/10 11:53
 */
public interface IOnlyProductController {

    @PostMapping("/op/setFreeze/{fId}")
    R<Integer> setFreeze(@PathVariable String fId) throws Exception, AuthException;

    @PostMapping("/op/selectAll")
    R<JsonPage<OnlyProductVo>> selectAll(
            @RequestParam(value = "fProductCode", required = false) String fProductCode,
            @RequestParam(value = "fProductName", required = false) String fProductName,
            @RequestParam("page") Integer page, @RequestParam("pageSize") Integer pageSize,
            @RequestParam("productCategory") Integer productCategory
    ) throws Exception, AuthException;


    /**
     * 装备列表
     * @return
     * @throws Exception
     * @throws AuthException
     */
    @PostMapping("/op/equipList")
    R<List<ProductInfoVo>> selectEquipList() throws Exception, AuthException;


}
